package com.huawei.appmarket.service.externalapi.view;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment;
import com.huawei.appgallery.foundation.ui.framework.widget.NetworkRemindBar.c;
import huawei.widget.HwButton;
import java.util.List;
import o.azb;
import o.cdb;
import o.dky.d;
import o.dky.h;
import o.dky.i;
import o.dky.j;
import o.CollectCheck;
import o.eth;
import o.etj;

public class NoNetworkLoadingFragment extends TaskFragment implements c, OnClickListener {
    private HwButton ʼ;
    private HwButton ʽ;
    private View ˊ;
    private ImageView ˋ;
    private View ˎ;
    private TextView ˏ;
    private ProgressBar ॱ;
    private boolean ᐝ = false;

    public void ˏ(Bundle bundle) {
        ॱˋ(true);
        super.ˏ(bundle);
    }

    public View ˋ(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View inflate = layoutInflater.inflate(i.ˋˋ, null);
        azb.ˏ(inflate);
        this.ॱ = (ProgressBar) inflate.findViewById(h.ﹳ);
        this.ॱ.setVisibility(8);
        this.ˎ = inflate.findViewById(h.ﾟ);
        this.ˎ.setBackgroundColor(inflate.getContext().getResources().getColor(d.ˏॱ));
        this.ˎ.setVisibility(8);
        if (!(ॱˋ() == null || ॱˋ().getActionBar() == null)) {
            ॱˋ().getActionBar().hide();
        }
        inflate.findViewById(h.ॱˍ).setVisibility(0);
        inflate.findViewById(h.ʻ).setOnClickListener(new OnClickListener(this) {
            final /* synthetic */ NoNetworkLoadingFragment ˋ;

            {
                this.ˋ = r1;
            }

            public void onClick(View view) {
                if (this.ˋ.ॱˋ() != null) {
                    this.ˋ.ॱˋ().finish();
                }
            }
        });
        this.ˏ = (TextView) inflate.findViewById(h.ॱˌ);
        this.ˏ.setText(ᐝॱ().getString(j.ॱͺ));
        this.ˋ = (ImageView) inflate.findViewById(h.ʻˋ);
        this.ˊ = inflate.findViewById(h.ॱـ);
        this.ˊ.setBackgroundColor(ᐝॱ().getColor(d.ˏॱ));
        this.ˊ.setVisibility(0);
        this.ˊ.setOnClickListener(new OnClickListener(this) {
            final /* synthetic */ NoNetworkLoadingFragment ˏ;

            {
                this.ˏ = r1;
            }

            public void onClick(View view) {
                this.ˏ.ʿˊ();
            }
        });
        this.ʽ = (HwButton) inflate.findViewById(h.ـॱ);
        this.ʼ = (HwButton) inflate.findViewById(h.ˉ);
        if (!((etj) cdb.ॱ(etj.class)).ॱ()) {
            this.ʼ.setVisibility(8);
        }
        this.ʼ.setOnClickListener(this);
        this.ʽ.setOnClickListener(this);
        return inflate;
    }

    public void onClick(View view) {
        if (view != null) {
            int id = view.getId();
            if (id == h.ـॱ) {
                eth.ˊ(ॱˋ());
            }
            if (id == h.ˉ) {
                eth.ॱ(ॱˋ());
            }
        }
    }

    public void ॱ() {
        this.ˎ.setVisibility(8);
        this.ॱ.setVisibility(8);
        this.ˊ.setVisibility(0);
    }

    public void ˎˎ() {
        super.ˎˎ();
        if (this.ॱ != null) {
            this.ॱ.setVisibility(8);
        }
    }

    public void ﾟॱ() {
        ʿˊ();
    }

    public void ˋ(TaskFragment taskFragment, List list) {
        super.ˋ(taskFragment, list);
        this.ᐝ = CollectCheck.isEmpty(list);
    }

    public void ʿˊ() {
        super.ʿˊ();
        if (!this.ᐝ) {
            this.ॱ.setVisibility(0);
            this.ˎ.setVisibility(0);
            this.ˊ.setVisibility(8);
        }
    }

    public void ﹶ() {
    }

    public void ʳ() {
    }
}
